/**
 * @file	OSAL_BidirectionalComm.c
 * @author	chipsea
 * @brief	
 * @version	0.1
 * @date	2021-01-07
 * @copyright Copyright (c) 2021, CHIPSEA Co., Ltd.
 * @note
 */

/**************************************************************************************************
 *                                            INCLUDES
 **************************************************************************************************/
#include "types.h"
#include "OSAL.h"
#include "OSAL_Tasks.h"

/* Application */
#include "BidirectionalComm.h"

/*********************************************************************
 * GLOBAL VARIABLES
 */

// The order in this table must be identical to the task initialization calls below in osalInitTask.
const pTaskEventHandlerFn tasksArr[] =
{
    BidirectionalComm_ProcessEvent,                                  // task 
};

const uint8 tasksCnt = sizeof( tasksArr ) / sizeof( tasksArr[0] );
uint16 *tasksEvents;

/*********************************************************************
 * FUNCTIONS
 *********************************************************************/

/*********************************************************************
 * @fn      osalInitTasks
 *
 * @brief   This function invokes the initialization function for each task.
 *
 * @param   void
 *
 * @return  none
 */
void osalInitTasks( void )
{
  uint8 taskID = 0;

  tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt);
  osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt));


  /* Application */
  BidirectionalComm_Init( taskID++ );	
	
}

/*********************************************************************
*********************************************************************/
